package com.qf.medical.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qf.medical.mapper.OperationMapper;
import com.qf.medical.service.OperationService;
import com.qf.medical.vo.PageBean;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

/**
 * @EXPLAIN:
 * @author: 苑天恒
 * @DATE: 2023/5/7 0007
 * @Email: 3483282099@qq.com
 */
@Service
public class OperationServiceImpl implements OperationService {
    @Autowired
    private OperationMapper operationMapper;
    @Override
    public PageBean selectOperation(Integer ssid, int page, int limit) {

        PageHelper.startPage(page, limit);
        PageInfo info = new PageInfo(operationMapper.selectWOperation(ssid));
        return PageBean.bean(info.getTotal(), info.getList());
    }

    @Override
    public PageBean selectOperationRoom(Integer ssrid, int page, int limit) {
        PageHelper.startPage(page, limit);
        PageInfo info = new PageInfo(operationMapper.selectOperationRoom(ssrid));
        return PageBean.bean(info.getTotal(), info.getList());
    }
}
